﻿<div class="col-xs-6 col-sm-4 col-md-3">
    <div class="thumbnail">
        <div class="xcol-md-3">
            <strong><span data-pacs-patientName="true"></span></strong>
            (<strong><span data-pacs-patientId="true"></span></strong>)
        </div>
        <hr/>
        <div class="xcol-md-2">
            <span>Date:</span>
            <span data-pacs-studyDate="true"></span>
        </div>
        <div class="xcol-md-3">
            <span>Description:</span>
            <span data-pacs-studyDesc="true"></span>
        </div>
        <div class="xcol-md-1">
            <span>Study ID:</span>
            <span data-pacs-studyID="true"></span>
        </div>
        <div class="xcol-md-1">
            <span>Accession #:</span>
            <span data-pacs-accessionNumber="true"></span>
        </div>
    </div>

    <div class="btn-group btn-group-justified my-btn-group" role="group" aria-label="...">

        @{
            var serverUrl = System.Configuration.ConfigurationManager.AppSettings["app:ohifViewer"];
            var showViewer = !string.IsNullOrWhiteSpace(serverUrl);

            if (showViewer)
            {
                <div class="btn-group" role="group">
                    <button type="button" data-pacs-ohifviewer="" class="btn btn-sm btn-success glyphicon glyphicon-new-window">
                        View
                    </button>
                </div>
            }
            else
            {
                <div class="btn-group dropup">
                    <a href="#" type="button" role="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        QIDO-RS
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="#" data-pacs-viewQidoStudy="json">JSON</a></li>
                        <li><a href="#" data-pacs-viewQidoStudy="xml">DIOCM XML</a></li>
                    </ul>
                </div>
            }
                <div class="btn-group" role="group">
                    <button type="button" data-pacs-querySeries="" class="btn btn-sm btn-default glyphicon glyphicon-th"></button>
                </div>
                <div class="btn-group dropup" role="group">
                    <button type="button" class="btn btn-default btn-sm dropdown-toggle glyphicon glyphicon-option-horizontal" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="#" data-pacs-deleteStudy="true">Delete</a></li>
                        <li class="divider" role="separator"></li>
                        <li><a href="#" data-pacs-study-json="true">RS-Meta (JSON)</a></li>
                        <li><a href="#" data-pacs-study-xml>RS-Meta (XML)</a></li>

                        @if (showViewer)
                        {
                        <li class="divider" role="separator"></li>
                        <li><a href="#" data-pacs-viewQidoStudy="json">QIDO (JSON)</a></li>
                        <li><a href="#" data-pacs-viewQidoStudy="xml">QIDO (XML)</a></li>
                        }
                    </ul>
                </div>
                }
            </div>
</div>